import sun.java2d.pipe.AAShapePipe;

import java.util.ArrayList;
import java.util.List;

public class Test {
    public static void main(String[] args) {
        ArrayList<Integer> arrayList = new ArrayList<>();
        arrayList.add(1);
        arrayList.add(2);
        arrayList.add(3);
        arrayList.add(4);
        arrayList.add(5);
        for (int i = 0; i < arrayList.size(); i++) {
            System.out.print(arrayList.get(i) + " ");
        }
        for (int x:arrayList) {
            System.out.print(x+ " ");
        }

        /*System.out.println(arrayList);
        List<Integer> list = new ArrayList<>();
        list = arrayList;
        list.set(0,2);
        System.out.println(list);
*/

        /*MyarrayList myarrayList = new MyarrayList();
        myarrayList.add(1);
        myarrayList.add(2);
        myarrayList.add(3);
        myarrayList.add(4);
        myarrayList.add(5);
        myarrayList.remove(4);
        *//*System.out.println(myarrayList.indexOf(10));
        System.out.println(myarrayList.get(4));*//*
        myarrayList.display();
*/

    }

}
